<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${content_tittle}</title>
<link href="${css_ctx}/style_login.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
         function del(){
			 if(!window.confirm('是否要删除数据?? '+ '\n' + '注意数据删除后将无法恢复'))
				return false;
		 }
    </script>
</head>

<body class="main_m"> 
<!-- main_title -->
<div class="main_title">
  <h3>${content_tittle}</h3>
  <c:remove var="content_tittle" scope="session"/>
</div>
<!-- End of main_title -->

<!-- 提示信息 -->
<c:if test="${!empty msg}">
   <div class="box ${msgrank}">${msg}</div>
   <c:remove var="msg" scope="session"/>
</c:if>
<!-- End of 提示信息 -->

<!--主体内容-->
<div class="">
  <table class="stylized full">
    <caption> <div class="tab_add"><a href="${ctx}/account.do?cmd=userinput&userid=0">添加新用户</a></div></caption>
    <thead>
        <tr>
            <th>序号</th>
            <th>用户名</th>
            <th>用户类型</th>
            <th>真实名字</th>
            <th>教研组</th>
            <th>科目</th>
            <th>性别</th>
            <th>电话</th>
            <th>离职</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
      <c:if test="${empty listAccount}">
		<tr><td colspan="11">没有找到相应的记录</td></tr>
	  </c:if>
	  <c:if test="${!empty listAccount}">
		<c:forEach items="${listAccount}" var="account" varStatus="status">
        <tr bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FFFFAA';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
            <td>[${status.count}]</td>
            <td><strong>${account.username}</strong></td>
            <td>
            <c:if test="${'0' eq account.userrole}"><span class="green">超级管理员</span></c:if>
            <c:if test="${'1' eq account.userrole}"><span class="green">管理员</span></c:if>
            <c:if test="${'2' eq account.userrole}">教研室组长</c:if>
            <c:if test="${'3' eq account.userrole}">普通教师</span></c:if>
            </td>
            <td><span class="blue">${account.realname}</span></td>
            <td>${account.groupname}</td>
            <td>${account.coursename}</td>
            <td>
            <c:if test="${'1' eq account.usersex}">男</c:if>
            <c:if test="${'2' eq account.usersex}">女</c:if>
            </td>
            <td>${account.userphone}</td>
            <td>
            <c:if test="${'1' eq account.isonline}"><span class="green">未离职</span></c:if>
            <c:if test="${'2' eq account.isonline}"><span class="red">离职</span></c:if>
            </td>
            <td><a href="#">备注</a></td>
            <td>
            <a href="${ctx}/account.do?cmd=userinput&userid=${account.userid}">修改</a> | 
            <a href="${ctx }/account.do?cmd=deleteAccount&userid=${account.userid}" onclick="return del();">删除</a>
            </td>
            
        </tr>
       </c:forEach>
	</c:if> 
    </tbody>
    <tfoot>
        <tr>
            <td colspan="11">Table footer</td>
        </tr>
    </tfoot>
    </table>
</div>
<!-- End of 主体内容 -->
<!-- footer -->
<div id="footer_main">
    <%@ include file="../base/footer.jsp"%>
</div>
<!-- End of footer -->
</body>
</html>
